#  普通登录
class BaseRole:
    def __init__(self):
        self.config = ['A', 'B', 'C']

    def get_map_useremail(self) -> str:
        email = self.config[0]
        return email
#B 微信
class Producter(BaseRole):

    def get_map_useremail(self) -> str:
        email = self.config[1]
        return email

    # C QQ
class Manager(BaseRole):
    def get_map_useremail(self) -> str:
        email = self.config[2]
        return email


#  写工厂类
class Factory:

    # 工厂函数
    def create_role(self, rolename):
        if rolename == 'manager':
            return Manager()
        elif rolename == 'producter':
            return Producter()
        else:
            return BaseRole()

if __name__ == '__main__':
    m = Factory().create_role('123')
    print(m.get_map_useremail())